import request from '../request.js'

// 登出
function logout(data) {
	return request({
		url: '/merchant/login/logout',
		method: 'post',
		data
	})
}
// 获取验证码----60秒限制  
function sms(data) {
	return request({
		url: '/merchant/common/sms',
		method: 'post',
		data
	})
}
// 修改密码
function changePsw(data) {
	return request({
		url: '/merchant/user/modify-password',
		method: 'post',
		data
	})
}
// 注销
function removeUser(data) {
	return request({
		url: '/merchant/user/user-cancel',
		method: 'post',
		data
	})
}
// 打印机列表
function brands(data) {
	return request({
		url: '/merchant/printer/brands',
		method: 'post',
		data
	})
}
// 打印模板列表
function templatesList(data) {
	return request({
		url: '/merchant/templates/lists',
		method: 'post',
		data
	})
}
// 打印模板列表
function storesList(data) {
	return request({
		url: '/merchant/stores/user-stores',
		method: 'post',
		data
	})
}
// 添加打印机
function addStorePrinter(data) {
	return request({
		url: '/merchant/printer/add-store-printer',
		method: 'post',
		data
	})
}
// 充值
function pay(data) {
	return request({
		url: '/pay/wechat/pay',
		method: 'post',
		data
	})
}
// 关闭充值
function orderClose(data) {
	return request({
		url: '/pay/wechat/orderClose',
		method: 'post',
		data
	})
}

function brandPrints(data) {
	return request({
		url: '/merchant/printer/merchant-brand-prints',
		method: 'post',
		data
	})
}

function printerList(data) {
	return request({
		url: '/merchant/printer/store-printer-lists',
		method: 'post',
		data
	})
}
// 编辑打印机
function editStorePrinter(data) {
	return request({
		url: '/merchant/printer/edit-store-printer',
		method: 'POST',
		data
	})
}
// 删除打印机
function deleteStorePrinter(data) {
	return request({
		url: '/merchant/printer/delete-store-printer',
		method: 'POST',
		data
	})
}
// 测试打印机
function testPrinter(data) {
	return request({
		url: '/merchant/printer/test-printer',
		method: 'POST',
		data
	})
}
// 清空打印机
function cancelall(data) {
	return request({
		url: '/merchant/printer/cancelall',
		method: 'POST',
		data
	})
}
// 充值记录
function getRechargeRecord(data) {
	return request({
		url: '/merchant/user/getRechargeRecord',
		method: 'POST',
		data
	})
}
// 钱包流水
function getWalletFlowRecord(data) {
	return request({
		url: '/merchant/user/getWalletFlowRecord',
		method: 'POST',
		data
	})
}
// 店员列表
function storeuserLists(data) {
	return request({
		url: '/merchant/store-user/lists',
		method: 'post',
		data
	})
}
// 删除店员
function deleteStoreuser(data) {
	return request({
		url: '/merchant/store-user/delete',
		method: 'post',
		data
	})
}
// 新增店员
function createStoreuser(data) {
	return request({
		url: '/merchant/store-user/create',
		method: 'post',
		data
	})
}
// 编辑店员
function editStoreuser(data) {
	return request({
		url: '/merchant/store-user/edit',
		method: 'post',
		data
	})
}
// 店铺类型
function storeTypes(data) {
	return request({
		url: '/merchant/common/store-types',
		method: 'post',
		data
	})
}
// 店铺类型
function goodTypes(data) {
	return request({
		url: '/merchant/common/goods-types',
		method: 'post',
		data
	})
}
// 编辑门店
function editStore(data) {
	return request({
		url: '/merchant/store/edit',
		method: 'post',
		data
	})
}
// 删除门店
function deleteStore(data) {
	return request({
		url: '/merchant/store/delete',
		method: 'post',
		data
	})
}
// 创建门店
function createStore(data) {
	return request({
		url: '/merchant/store/create',
		method: 'post',
		data
	})
}
// 创建门店
function areas(data) {
	return request({
		url: '/merchant/common/areas',
		method: 'post',
		data
	})
}

export {
	logout,
	sms,
	changePsw,
	removeUser,
	brands,
	templatesList,
	storesList,
	addStorePrinter,
	pay,
	brandPrints,
	printerList,
	editStorePrinter,
	deleteStorePrinter,
	testPrinter,
	cancelall,
	orderClose,
	getRechargeRecord,
	getWalletFlowRecord,
	storeuserLists,
	deleteStoreuser,
	createStoreuser,
	editStoreuser,
	storeTypes,
	goodTypes,
	editStore,
	deleteStore,
	createStore,
	areas
}